Optimal. Leaf size=167 \[ \frac{b (a+b \tan (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \tan (c+d x)}{a-\sqrt{-b^2}}\right )}{2 \sqrt{-b^2} d (n+1) \left (a-\sqrt{-b^2}\right )}-\frac{b (a+b \tan (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \tan (c+d x)}{a+\sqrt{-b^2}}\right )}{2 \sqrt{-b^2} d (n+1) \left (a+\sqrt{-b^2}\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.103734, antiderivative size = 167, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {3485, 712, 68} \[ \frac{b (a+b \tan (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \tan (c+d x)}{a-\sqrt{-b^2}}\right )}{2 \sqrt{-b^2} d (n+1) \left (a-\sqrt{-b^2}\right )}-\frac{b (a+b \tan (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \tan (c+d x)}{a+\sqrt{-b^2}}\right )}{2 \sqrt{-b^2} d (n+1) \left (a+\sqrt{-b^2}\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3485
Rule 712
Rule 68
Rubi steps
\begin{align*} \int (a+b \tan (c+d x))^n \, dx &=\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{d}\\ &=\frac{b \operatorname{Subst}\left (\int \left (\frac{\sqrt{-b^2} (a+x)^n}{2 b^2 \left (\sqrt{-b^2}-x\right )}+\frac{\sqrt{-b^2} (a+x)^n}{2 b^2 \left (\sqrt{-b^2}+x\right )}\right ) \, dx,x,b \tan (c+d x)\right )}{d}\\ &=-\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n}{\sqrt{-b^2}-x} \, dx,x,b \tan (c+d x)\right )}{2 \sqrt{-b^2} d}-\frac{b \operatorname{Subst}\left (\int \frac{(a+x)^n}{\sqrt{-b^2}+x} \, dx,x,b \tan (c+d x)\right )}{2 \sqrt{-b^2} d}\\ &=\frac{b \, _2F_1\left (1,1+n;2+n;\frac{a+b \tan (c+d x)}{a-\sqrt{-b^2}}\right ) (a+b \tan (c+d x))^{1+n}}{2 \sqrt{-b^2} \left (a-\sqrt{-b^2}\right ) d (1+n)}-\frac{b \, _2F_1\left (1,1+n;2+n;\frac{a+b \tan (c+d x)}{a+\sqrt{-b^2}}\right ) (a+b \tan (c+d x))^{1+n}}{2 \sqrt{-b^2} \left (a+\sqrt{-b^2}\right ) d (1+n)}\\ \end{align*}
Mathematica [C] time = 0.125465, size = 118, normalized size = 0.71 \[ \frac{(a+b \tan (c+d x))^{n+1} \left ((a+i b) \, _2F_1\left (1,n+1;n+2;\frac{a+b \tan (c+d x)}{a-i b}\right )-(a-i b) \, _2F_1\left (1,n+1;n+2;\frac{a+b \tan (c+d x)}{a+i b}\right )\right )}{2 d (n+1) (a+i b) (b+i a)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.136, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b\tan \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \tan \left (d x + c\right ) + a\right )}^{n}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right )^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]